<%-- 
    Document   : MenuRight
    Created on : Sep 29, 2012, 4:03:31 PM
    Author     : MinhThang
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@page import="com.myapp.DAO.SpeakerDao"%>
<%@page import="org.apt.Bean.SpeakerEntities"%>
<%@page import="org.apt.Bean.LectureEntities"%>
<%@page import="com.myapp.DAO.LectureDao"%>
<%@page import="java.util.List"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta name="description" content="website description" />
        <meta name="keywords" content="website keywords, website keywords" />
        <meta http-equiv="content-type" content="text/html; charset=windows-1252" />
        <link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Tangerine&amp;v1#" />
        <link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Yanone+Kaffeesatz" />
        <link rel="stylesheet" type="text/css" href="style/style.css" />

        <title>JSP Page</title>
        <script  type="text/javascript">   
            function checklogin()
            {
                if(document.loginForm.txtUserName.value =='')
                {
                    alert('User name is require!');
                    document.loginForm.txtUserName.focus();
                    return false;
                }
                if(document.loginForm.txtPassword.value =="")
                {
                    alert('Password is require!');
                    document.loginForm.txtPassword.focus();
                    return false;
                }
            }
        </script>
    </head>
    <body>
        <div id="sidebar_container">
            <img class="paperclip" src="style/paperclip.png" alt="paperclip" />
            <div class="sidebar">
                <%
                            String userName = null;
                            String password = null;
                            Cookie cookies[] = request.getCookies();
                            if (cookies != null) {
                                for (int i = 0; i < cookies.length; i++) {
                                    if (cookies[i].getName().equals("UserID")) {
                                        userName = cookies[i].getValue();
                                        break;
                                    }
                                }
                                for (int i = 0; i < cookies.length; i++) {
                                    if (cookies[i].getName().equals("Password")) {
                                        password = cookies[i].getValue();
                                        break;
                                    }
                                }
                            }
                            if (session.getAttribute("UserID") != null) {
                %><br><br>
                <h4 class="user"><span style="font-weight: bold">Welcome: </span><a href="../Member.jsp"><span style="font-style: italic;font-size: 14px;color: blue"> <%= session.getAttribute("UserID").toString()%></span> </h4></a><br><a href="logoutclient">Logout</a><br><br>
                <a href="../Member.jsp">View infomation of member</a><br><br>
                <a href="../EventRegister.jsp">View Event had been registed</a>
                <%
                                            } else {
                %>
                <h3 align="center">Login</h3>
                <form name="loginForm" action="/loginclient" method="post" onsubmit="return checklogin();" >
                    <table style="width: 100%">
                        <tr>
                            <td><span class="lable">UserName: </span></td>
                            <td><input type="text" id="textinputlogin" name="txtUserName" value="<%=userName%>" /></td>
                        </tr>
                        <tr>
                            <td><span class="lable">Password: </span></td>
                            <td><input type="password" id="textinputlogin" name="txtPassword" value="<%=password%>" /></td>
                        </tr>
                        <tr><td></td>
                            <td><input  type="checkbox" id="textinputlogin" value="" name="cbRemember" > Remember</td>
                        </tr>
                        <tr>
                            <td colspan="2">
                                <input  id="pagestatus" type="submit" value="Login" name="btLogin" style="width: 80px; font-weight: bold"/>  <a href="ForgetPassword.jsp">Forget your password</a>
                            </td>
                        </tr>
                    </table>
                </form>
                <%                            }
                %>
            </div>
            <img class="paperclip" src="style/paperclip.png" alt="paperclip" />
            <div class="sidebar">
                <h3 align="center">Speakers</h3>
                <%
                            List<SpeakerEntities> list = SpeakerDao.GetTopTenSpeaker();
                            if (list != null) {
                                for (SpeakerEntities speaker : list) {%>
                <div class="divcontentright" style="height: 35px; width: 100%">
                    <div  style="width: 100%; float: left;font-size: 14px;vertical-align: middle">
                        <img width="15px" height="15px" src="../images/Spear-images.png" alt="">&nbsp;&nbsp;&nbsp;<a style="color: blue" href="ListSeminarOfAuthor.jsp?speakerID=<%=speaker.getID()%>"> <%=speaker.getFullName()%></a>
                    </div>
                </div>
                <%}
                            }
                %>
            </div>
            <img class="paperclip" src="style/paperclip.png" alt="paperclip" />
            <div class="sidebar">
                <h3 align="center">Lecture Victory</h3>
                <%
                            List<LectureEntities> listLectire = LectureDao.getTop5Lecture();
                            if (listLectire != null) {
                                for (LectureEntities lecture : listLectire) {%>
                <div class="divcontentright" style="height: 35px; width: 100%">
                    <div  style="width: 100%; float: left;font-size: 14px;vertical-align: middle">
                        <img style="height: 15px; width: 15px" src="../images/lecture-image.png" alt="">&nbsp;&nbsp;&nbsp;<a style="color: blue" href="LectureDetail.jsp?lectureID=<%=lecture.getLectureID()%>"> <%=lecture.getTitle()%></a>
                    </div>
                </div>
                <%}
                            }
                %>
            </div>
            <img class="paperclip" src="style/paperclip.png" alt="paperclip" />
            <div class="sidebar">
                <h3 align="center">Online support</h3>
                <div style="width: 200px;display: inline">
                    <div style="width: 20px; height: 40px; float: left"><img width="30px"  height="40px" src="../images/call-center-icon.png" alt=""/></div>
                    <div style="width: 130px ;float: left; padding-left: 65px;color: #fb5e00">Tel:(04)3454654<br>
                        Hotline:0988077796</div>
                </div>
                <table>
                    <tr >
                        <td>Mr.Thắng</td>
                        <td><a href="ymsgr:sendIM?lonely_bird_089">
                                <img src="http://opi.yahoo.com/online?u=lonely_bird_089&m=g&t=2" border="0" width="125" height="25" /><br />
                            </a></td>
                    </tr>
                    <tr>
                        <td>Mr.Vinh</td>
                        <td><a href="ymsgr:sendIM?anhchangcodon_qninh">
                                <img src="http://opi.yahoo.com/online?u=anhchangcodon_qninh&m=g&t=2" border="0" width="125" height="25" /><br />
                            </a></td>
                    </tr>
                    <tr>
                        <td>Mr.Ngọc</td>
                        <td><a href="ymsgr:sendIM?hoangtulasvegas_dish_haydichat">
                                <img src="http://opi.yahoo.com/online?u=hoangtulasvegas_dish_haydichat&m=g&t=2" border="0" width="125" height="25" /><br />
                            </a></td>
                    </tr>
                    <tr>
                        <td>Mr.Hòa</td>
                        <td><a href="ymsgr:sendIM?reborn424">
                                <img src="http://opi.yahoo.com/online?u=reborn424&m=g&t=2" border="0" width="125" height="25" /><br />
                            </a></td>
                    </tr>
                </table>
            </div>
            <span style="color: blue;font-size: 15px; font-style: italic">View address in map</span>
            <div class="sidebar">
                <iframe width="233px" height="280px"  style="padding-top: 10px" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://maps.google.com/maps?f=d&amp;source=s_d&amp;saddr=&amp;daddr=Hanoi+Aptech+-+19+Nguy%E1%BB%85n+Tr%C3%A3i,+19+AH+13,+Thanh+Xu%C3%A2n,+Hanoi&amp;geocode=CUgHjspyAsq4FVZ8QAEd6rJOBinpNYlohKw1MTGZ7YR3IXoLcg&amp;sll=21.009001,105.825076&amp;sspn=0.021754,0.042272&amp;gl=vn&amp;hl=en&amp;mra=mift&amp;ie=UTF8&amp;t=m&amp;ll=21.009001,105.825076&amp;spn=0.021754,0.042272&amp;output=embed"></iframe><br />
                <small><a href="https://maps.google.com/maps?f=d&amp;source=embed&amp;saddr=&amp;daddr=Hanoi+Aptech+-+19+Nguy%E1%BB%85n+Tr%C3%A3i,+19+AH+13,+Thanh+Xu%C3%A2n,+Hanoi&amp;geocode=CUgHjspyAsq4FVZ8QAEd6rJOBinpNYlohKw1MTGZ7YR3IXoLcg&amp;sll=21.009001,105.825076&amp;sspn=0.021754,0.042272&amp;gl=vn&amp;hl=en&amp;mra=mift&amp;ie=UTF8&amp;t=m&amp;ll=21.009001,105.825076&amp;spn=0.021754,0.042272" style="color:#0000FF;text-align:left" target="_blank">View Larger Map</a></small>
                content bar
            </div>
            <hr style="margin-right: 35px"><br>
            <div class="sidebar" id="duvCounter">
                <tr>
                <div align="center" style="width: 100%"><span style="color: #35548b; font-weight: bold;font-size:15px">Total number visited</span></div></td>
                <div align="center" style="width: 100%"><a href="http://www.amazingcounters.com"><img border="0" src="http://cc.amazingcounters.com/counter.php?i=3083359&c=9250390" alt="AmazingCounters.com"></a>
                    </tr>
                </div>
            </div>
    </body>
</html>
